# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=eapmd5pass
pkgver=3.3d5551f
pkgrel=2
groups=('blackarch' 'blackarch-cracker' 'blackarch-wireless')
pkgdesc='An implementation of an offline dictionary attack against the EAP-MD5 protocol.'
url='http://www.willhackforsushi.com/?page_id=67'
arch=('x86_64' 'aarch64')
license=('GPL2')
depends=('libpcap')
makedepends=('git')
source=("git+https://github.com/joswr1ght/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make utils.o
  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
  install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE COPYING
}

